029 understanding basic mathematical operations like add sub mul and divide
您好,欢迎来到我们的土地,我们在这个视频中做了崇拜者涂鸦,我们将了解 Seamans a 200。
Hello welcome to our land we did adorers in this video to doodle we are going to learn about Seamans a 200.
我们将在其中看到数学运算。
And in that we'll see the math operations.
好的。
OK.
因此,数学运算非常简单,您可能之前在任何其他应用程序中都已经知道了。
So the math operations are pretty simple which you might have known before in any other applications.
正如您可能在课堂或大学中学习过的那样,它是基本的加减除法乘法增量减量。
As you might have studied in your classes or in university it's basic addition subtraction division multiplication increment decrement.
所以我们将看看如何在 PC 上做到这一点。
So we're going to see that how we can do that in the PC.
好的,因为我们有很多流程需要进行一些计算。
OK because we have many processes where we have to do some calculations.
例如,我们必须计算盒子的数量,我们必须计算估计一年或一个月或一周的产量。
We have to for example we have to count the boxes we have to count their production for an year estimated or maybe for a month for a week.
为此,我们做了一些估计,并根据当前的处理速率进行计算。
So for that we make some estimations and we calculate that based on the current process rate.
因此,在我们看到 PC 中使用的一些数据驱动器之前,让我们先看看各种操作是什么。
So let's see that what are the various operations by before we'll see some data drives which are used in the PC.
好的。
Okay.
那么让我们继续吧。
So let's proceed.
因此,在数据人员中,我们列出了这里的基本生活。
So in the data guys we have the basic lives listed here.
我们从球开始是一个布尔值。
We start with the ball is a boolean.
您之前可能已经了解到这一点,就像我们有正确和错误的陈述一样。
You might have learned that before like we have true and false statements.
因此,在 BLT 中,我们有类似的 Boullion 声明,但在这里我们代表该视频和一个。
So in BLT we have similar Boullion statements but here we represent that video and one.
好的。
Okay.
因此,通常当您按下连接到 APAC 的按钮时,如果按钮发出信号,则该信号被视为 1 Boullion,如果按钮未收到零信号,则该信号被视为 1 Boullion。
So generally when you press a button which is connected to APAC and if the button is giving a signal that is considered as one Boullion one if the button is not getting a signal that is zero.
因此,电压的存在或不存在以及 B 是输入由布尔数据类型表示,因此其长度为 1。
So that presence or absence of voltage and the B is the input is signified by a boolean datatype so its length is one.
好的。
OK.
因此,当存在某物时,他们只会呈现一个。
So when something is present will they just present one.
如果不为零。
If it is not zero.
这就是为什么您会在这里看到地址示例 I 0.0.0.0。
Thats why you will see here the address example as I 0.0.
这是我们提供给 Bielski 的输入,我想正如我所说,如果您按下按钮(如果不按下按钮),则会被 0.0 感测到,这将表示布尔数据类型是否存在输入。
This is the input which is which we give to the Bielski I guess as I said if you press a button if you dont that is sensed by 0.0 and that will represent the presence or absence of input by a boolean data type.
所以它将用零和一来表示。
So it will represent by zero and one.
好的。
OK.
同样我们有一个输出,如果我们想打开输出他会给你十亿1的输出。
Similarly we have an output if we want to turn on the output he will give you well-lived billion 1 to the output.
如果您不询问是否要关闭输出,则将为输出指定 0。
If you don't ask if you want to do an off the output you will give 0 to the output.
所以这只是开关操作,3.0 是一个内部存储器,您可以打开和关闭它,它将帮助您使逻辑更容易。
So that's just on and off operation and 3.0 is an internal memory which you can turn on and off and it will help you to make your logic easier.
与此类似,我们有非常可靠的建议,比如我们有字节,我们的字节不是打开和关闭的,它有 8 位亚特兰大 8 位。
So similar to that we have very solid advice like we have byte our byte is not on and off it is having 8 bits Atlantas 8 bits.
所以它的范围是从负 1 2 8 到 1 2 7 或 0 2 到 5。
So it's range from minus 1 2 8 to 1 2 7 or 0 2 to 5.
好的。
Okay.
这是二进制形式的表示形式,也是您在 PNC 中使用的地址示例。
And that is the representation in binary form and that's the address example which you use in the PNC.
好的,您可以使用 MBT 您想在指令中使用字节,或者如果需要,您可以使用此范围进行计算。
OK so you can use MBT You want to use byte in instruction or you can use this range for calculation if you are.
如果您的结果在此范围内,您可以使用 might。
If your result is in this range you can use might.
好的,我们已经想好了,现在单词是 16,但这几乎是我们 16 的范围的两倍。
OK so we have thought and now word is 16 but it's almost double our range of let's with 16.
它是 8 和 16 几乎两倍,而且范围也更大。
It's 8 and it's 16 almost double and its range is pretty much more.
现在如何获得这个范围。
Now how to get this range.
如果你在这个时候取基数二。
If you take the base two in this in this time.
如果你现在把 16 放在这里,如果你计算一下,这个小结果就是这么多。
And if you put 16 here now if you calculate this little turns out to be this much.
这就是你得到的极限顺序的范围。
So that's the range you get the range of the order of your limit.
好的。
OK.
这是一个例子,说明人们如何看到虚空的表现,这是该建筑中新闻之间的相关数据。
That's an example of how you will see in the people see the representation of a void and that's the relevant data between news in that building.
所以从 W 开始,涉及强奸。
So it starts with W that rape is involved.
现在,如果您下定决心,或者如果您的计算超出了这个范围,那么您很可能会使用 double 将 32 翻倍,但它是 7 200 的最大大小,其范围就是这么多。
Now if you're resolved or if your calculation goes beyond this range which is pretty much likely you will use double would double what is 32 but it's the maximum size of a 7 200 and its range is that much.
这是一个很好的例子。
And it's a great example.
医学博士零。
M.D zero.
所以现在有些人像你一样。
So now some like you.
类似地,你有 S 并且它已签名并且处于危险之中。
Similarly you have S and that is signed and it is in danger.
好的。
OK.
这是一个伟大的。
This is a great.
那么你的 unsigned int 又是 8 伙计。
Then you have unsigned int that is again 8 mate.
在这里,你只有与社会相对的价值观,你有负面的,你将使用以零结尾的询问。
Here you have only values in positons with the society you have the negative and you will use end with zero for asking.
又是谁呢。
And who is it.
好吧,如果你正处于危险之中。
OK then if you have just in danger.
抱歉,这是,这是,这不是镜头,这是,不是科学家的镜头,然后你就处于 16 位的危险之中。
Sorry this was this is this is not shot this is this a shot not scientists a shot and then you have in danger that is 16 bit.
这就是范围,这就是 MWC。
So this is the range and thats MWC.
那么爱因斯坦就处于危险之中,其范围只有正数。
Then you have Einstein in danger which is ranges only positive.
再说一遍,这不是零。
Again it's not the zero.
然后你有加贝尔和塔莱,或者两者都再次无符号加倍。
Then you have Gabel and Tallet or both an unsigned doubling again.
所以你有很多生命,根据你的计算结果,你可以选择你想要使用的生命。
So you have a lot of lives and based on your results based on your calculations you can select which one you want to use.
好的。
OK.
所以他这些更多的在我们的数学计算中。
So he these more in our mathematical calculations.
好吧,让我们继续吧。
All right so let's proceed.
你还有另一美元,这才是真正的美元。
You have another dollar which is the real dollar right.
因此,如果你的结果是一个分数,例如如果你解决了需要一些精确的分数计算,那么你必须使用一个真实的数据行 k,它有 32 位的 Lent,并且它的表示形式是 M.D 零。
So if your result is a fraction for example if you resolved need some precise calculations in fractions then you have to use a real data line k which has 32 bits of Lent and its representation is with M.D zero.
现在确定这些数据是如何分布的。
OK now how this data is distributed.
我有一个小图表可以给你看。
I have a small chart to show you.
您有代表符号的线下注,这意味着符号对于 1 位来说是正数或负数,就像 0 一样。
You have line bet which represent the sign sign means there's the sign was positive or negative to 1 bit as does 0 for that.
然后就有 8 位保留给指数指数。
Then you have 8 bits which are reserved for exponent exponents.
是这个吗。
Is this one.
好的。
OK.
即 e 次方减 3。
That is the power e minus 3.
负30度通常是危险的。
It is generally dangerous for minus 30.
这就是这个援助解决的问题。
And this is this is solved by this aid.
但是,Manti 的值会显示在您的 PC 中。
But then you have Manti's have this value which you display in your PC.
这就是实际数据类型的内存分配的解决方法。
So that's how the distribution of memory has been resolved for real datatypes.
好的,现在让我们继续看一些数学运算的基本示例。
OK so now let's proceed to some basic example of math operations.
那么让我们从添加开始吧。
So let's start with the addition.
甚至不使用两个或多个输入的有用加法。
Not even use useful addition of two or more inputs.
好的,让我们看一下每个之前的零状态的示例。
OK so let's see an example state of our zero before that each.
现在这是附加块,这里有一个输入启用。
Now this is the addition block here you have an input enable.
因此,如果您在此处给出输入,则该块将被启用,该块将位于此处。
So if you give an input here this block will be enabled this block will be at this.
好的。
OK.
现在,当这个块执行时,它将感知输入。
Now when this block will do it will sense the input.
它处于支配地位,所以它输入 1 可能是 10。
It's in dominance so it input one as maybe 10.
现在这是字节 8 位。
Now this is byte 8 bit.
好吧,这是我们生活在赫伯特的另一口。
OK this is we live in another bite of hbert.
所以这就是 bitis 一百零三里面的 Dahdah。
So it's it's Dahdah inside the bitis hundred and three.
那么如果我打开吐痰会发生什么。
So what will happen if I turn on the spit it will.
这个并将结果提供给我的输出。
And this one and give the result to my output.
好的。
OK.
我们只是M-B。
We're just M-B.
现在它是零,因为这个博客不活跃。
Well right now it's zero because this blog is not active.
这个没开。
This is not on.
因此,当我打开这一行或打开此行时,我会执行此操作,结果将是一或三。
So when I turn on this line or this is on this will I do this one and the results will be one or three.
这很容易。
This is pretty easy.
所以除此之外这只是一个例子,你没有200三个。
So besides this is just an example you don't have two hundred and three.
这是一个例子。
This is an example.
但想象一下,如果您有来自传感器的数据,我们只是计算传送带上运行的瓶子。
But imagine if you have the data coming from a sensor here we're just counting the bottles running on the conveyors.
这又是另一个可能正在运行的盒子。
And this is again another can where which is running maybe boxes.
因此,您可以进行总生产并在最终电阻器中显示出来。
So you can do total production and show that in the final resistor.
所以这是由传感器单独感测的。
So this is an individually sensed by a sensor.
这是传感器,另一个传感器异常地感测到这一点。
Here's the sensor and this is unusually sensed by another sensor.
因此,这些数据可能是可变的,这将向您显示总产量。
So these data may be variable and this would show you the total production.
在那里您可以使用添加指令。
There you can use an add instruction.
好的,我希望您能想象一下您还可以在哪里使用此 out 指令。
OK so I hope you can imagine where else you can also use this out instruction.
现在,如果您在这里看到这颗星,这意味着您可以添加更多输入。
Now if you see this star here this means you can add more inputs.
让我删除这部分。
Let me just remove this part.
是的。
Yeah.
这意味着您可以添加更多输入。
This means you can add more inputs.
假设您有 3 个传送带或 10 个枪械制造商,您可以在此处添加更多输入,并且您将继续这样做,并且应该添加输出电阻器。
Suppose you have three conveyors or 10 gunmakers you can add more inputs here and you're going on that and should add in the output resistor.
好的。
All right.
那么我们就用减法来减去进口。
So then we have subtract for subtraction of import.
现在这非常相似。
Now this is pretty similar.
这是一百零三。
This is hundred and three.
结果是一百减三,即 97。
And the result would be a hundred minus three which with 97.
所以这里矿工的减法运算就很简单了。
So here it's the miners operation subtraction operations pretty easy.
好的,让我们继续吧。
OK so let's move ahead.
然后我们有乘法中的乘法,你的输入将被乘以 30 my 的输出。
Then we have multiplications in multiplication your input will be multiplied and will be given to the outputs 30 my by 3.
90了。
It's 90.
好的。
OK.
因此,这里有人可以有更多的多个输入来在不同的源中相乘,而不是两个输入的除法除法。
So somebody here you can have more multiple inputs to multiply in different sources than division division of two inputs.
托迪再次除以三。
Again Todi divided by three.
10 了。
It's 10.
所以你在电脑上也可以进行除法运算。
So you have the division operation as well in the PC.
所以这些所有博客都有一个启用输入。
So these all blogs has an enable input.
一旦这个输入在这里,那么只有它才能解决输入问题。
Once this input is here then only it will solve the inputs.
好的,然后我们已经修改了引擎的其余部分。
OK then we have mod the remainder of the engine.
好吧,有时我们需要余数。
Ok sometimes we need a remainder.
因此,在这种情况下,如果您在这里看到 31 除以 3,则余数将是此处给出的。
So in that case if you see here 31 divided by three the remainder will be one that is given here.
好的,然后我们有一个计算来计算预定义的方程。
OK then we have a calculate to calculate a predefined equation.
假设你有一个方程。
Suppose you have an equation.
我们有乘法、除法和加法。
We have multiplication and division and addition.
除了制作不同的加减乘法块之外,您还可以使用计算块,在该块内您可以编写输入,并且可以编写运算符符号。
And besides making different blocks of addition subtraction multiplication you can use a calculate block and inside that block you can write your inputs and you can write a symbol the operator.
您可以在其中定义您的方程式。
You can define your equation inside that.
因此,如果我们在这里看到 80 和 40,则这是 80 英里除以 40,再加上 80 除以 40。
So if we see here 80 and 40 this is 80 mile divide by 40 and a addition with 80 divided by 40.
因此,如果我们单独计算,结果将是 3 2 0 2。
So if we calculate that separately the result will be 3 2 0 2.
所以我们把 80 除以 40 就是今天的 200 加 7:52 大约是 40 到 3200 加二。
So let's do that 80 into 40 is today 200 plus 7:52 about 40 to thirty two hundred plus two.
所以如果你看到这个结果是两个 200。
So if you see this result is two 200.
除法的结果将是二。
And the result of division will be two.
所以除了这个结果。
So in addition to this this result.
好的。
OK.
所以这会让你的程序少一点Lyndie,更加干净。
So this will make your program less Lyndie and more clean.
好的。
OK.
因此,我们的下一个指令是增加我的收入,并用于让 Inkerman 减少加一。
So the next instruction we have is increment my income and it's used to Inkerman down by plus one.
好的。
OK.
现在,如果你在这里看到我们有这个 Engelmann 块,那就是我的输入 M.W.
Now if you see here we have this Engelmann block and that's my input M.W.
零。
zero.
里面有一个D。
It has a D inside that.
一旦我进行增量,它就会变成 83。
And once I do the incrementation it will do make it 83.
现在您会注意到,在前面的示例中,我没有使用 spile,但这里我使用的是脉冲。
Now you will notice here in the previous example I was not using the spiles But here I am using a pulse.
原因是,如果您不使用脉冲,将会发生什么,它会根据您输入的持续时间增加到一个更大的值。
The reason is if you don't use a pulse what will happen it will increment to you know to a larger value based on the duration of your input.
假设我使用按钮。
Suppose I'm using a push button.
好的。
OK.
现在这只是我的按钮,如果我从外部现实手动按下这个按钮一次,我使用这个 VIDOT 就是我使用正常输入 0.0 的那个,并且我在将要发生的情况之外使用按钮。
Now that's just my push button and if I press this button once manually from external reality and I use this VIDOT be the one I use normal input 0.0 and I use a push button outside of what will happen.
这会将其增加到更大的卷,但如果我使用 b,它只会在命令中使用最后一个所需的卷。
This will increment it to a larger volume but if I use a b it will only in command with last one which is required.
现在的问题是为什么要将Inkerman设置为更大的值。
Now the question is why it will Inkerman to a larger value.
原因是扫描时间。
The reason is the scan time.
好的。
OK.
现在如果你知道美国
Now if you know that the U.S.
在扫描时间内有一个扫描时间,它将多次解决逻辑问题。
has a scan time in scan time it will solve the logic multiple times.
因此,假设如果我按下按钮,则手动进行。
So suppose manually if I press a button.
所以每个可能会持续很长时间,比如说五秒钟。
So each may last long for let's say five seconds.
如果您手动按下按钮并释放它,可能会出现第三点或第四点。
If you manually press a button and release it maybe point three or point four.
让我们以五秒为例。
Let's take an example point five seconds.
假设橙色或五英里的偏向扫描时间。
And the scan time of biase as let's say orange or five miles.
好的。
OK.
因此,如果在天空中按四点五秒,则在该皮革中按四点五点五毫秒。
So if it is pressed four point five second to be in the sky in this leather forces four point five by point five milliseconds.
因此,它将被扫描如此多次,并且如此多次,由于点五秒,信号为高电平。
So it will be scanned so many times and for so that and for that many times the signal is high because of point five seconds.
所以它真的不是那么远。
So it really isn't that far.
如此多次,巴比伦五秒内就会有5毫秒这样的食物。
So many times which will be within five seconds of Babylon 5 milliseconds so that food.
因此,这就是为什么即使您按下按钮,它也会被大量命令或更少的时间,因为扫描仪比您要少得多,然后您按下按钮时就完成了。
So that's why it was being commanded by larger amounts even if you press it or lesser time because the scanner is much less than you are then you are done the time when you press the button.
好的。
OK.
这就是为什么我们更喜欢使用脉冲命令,因为当您使用脉冲命令时,无论您按下此按钮多久,输出都将仅打开一个脉冲,并且该脉冲的持续时间等于一天中的扫描时间。
So that's why we prefer to use a pulse command because when you use a pulse command no matter how much longer you press this button the output will be on for only a single pulse and the duration of this pulse is equal to scan time of day.
这就是为什么我们在使用增量时总是使用这些正数或负数,或者如果您在命令中使用 Dignum,那么最会减一的数是 83,但一个脉冲它会变成 82。
That's the reason we are we always use those positive or negative when we are using increment or maybe if you're using Dignum in command and which then wouldest decrement by minus one is 83 but one pulse it goes to 82.
好吧,这就是为什么在这里使用这些脉冲的原因。
OK this is the reason why the use of these pulses here.
好吧,你可以尝试不使用双打,你会注意到差异。
OK you could try that without doubles and you would notice the difference.
如果您使用乳头。
If you're using the nipples.
好的。
OK.
好的。
OK.
现在我们有一个最低限度。
Now we have a get minimum.
它表示它将输入的值与输出的最小值进行比较。
It says it compares the value of the input and right the lowest value to the output.
所以这很容易理解。
So it's very easy to understand.
你在这里再次有一个脉搏,你也可以有一个正常的我正在使用嗡嗡声,因为我只是在增加增量,所以我不想改变我的好我的决定也是在选票上。
You have again have a pulse here you can also have a normal I'm using a buzz because I was just making the of the increment so I didn't want to change my good my decision was on the ballot as well.
所以现在你可以是 82 和 40。
So now you're able is 82 and 40.
因此,当你在这里有一个脉冲时,它会计算哪一个是最低的,并将其输出。
So the moment you have a pulse here it will calculate which one is the lowest one and make it to the output.
好吧,假设如果您再次计算,您必须让传送带来这里为您提供产品信息。
OK so suppose if you are calculating again you have to conveyers coming here giving you the product information.
产品数量。
The number of products.
如果您想查看哪一个的金额最低,您可以使用此最小值和此处的结果。
And if you want to see which one has the lowest amount you can use this minimum and the result here.
好的。
OK.
然后你必须获得最大值。
Then you have to get maximum.
如此相似,您可以显示最大值。
So similar that you can display the value which is maximum.
都是这两个大的。
All of these two big ones.
如果您在这里看到一颗星,则意味着您可以将更多导入添加到您的启动大小中,并在最大块中找到最大值,并在其中找到最小值。
And if you see a star here it means you can add more imports to your to your in boot size and find the maximum in the Maximum block and minimum with them in.
好的。
OK.
这些都是很好的指导,这在早期的 7 200 中是没有的。
These are good instruction which was not earlier in a seven 200.
所以你必须设计这个指令。
So you have to design this instruction.
但这里有一个不同的块来查找最小值和最大值。
But here you have a different block to find the minimum and maximum.
所以它非常灵活。
So it is pretty flexible.
好的。
OK.
接下来是设置限制。
Next is set limit.
这是一个非常好的指导。
Now this is a very good instruction.
它说你有一个限制。
It says you have a limit.
阻止确定。
BLOCK OK.
在法庭上有最低和最高限额。
With a minimum and maximum in court.
所以这是最小和最大限制。
So this is the minimum and maximum limit.
好的。
OK.
所以我们这里有 2000 个。
So we have here 2000.
然后有一个最大值是 3000 OK 然后你在这里有一个小的输入,我们有 M.W.
Then there's a maximum which is 3000 OK then you have a small input here where we have both M.W.
零。
zero.
好的,接下来会发生什么,这就是输出。
OK so what will happen this is the output.
所以现在赌注还没有开始,如果我打开这个输入赌注会发生什么。
So right now the bet is not on if I turn on this input bet what will happen.
如果我的输入小于最小值,它会给我的输入一个范围。
It will give a range to my input if my input has less than my minimum.
因此,如果输入小于最小限制或介于最小值和最大值之间,则有两个示例。
So if input is less than the minimum limit or between minimum and maximum you have two example.
因此输入小于您在此处看到的最小限制,以查看那些小于 2000 的内容。
So the input is less than minimum limit you see here to see those less than 2000.
但是在输出中我们有最小限制,所以输出总是在最小到最大的范围内,但它小于 2000,尽管它会直接占用房屋,因为歌剧不会小于 2000。
But in the output we have the minimum limit so the output will always be in the range of minimum to maximum but it's less than 2000 although it will take houses directly because opera will not take any less than 2000.
现在,如果输入在最小值和最大值之间(即 2 到 2),那么在 2000 到 3000 之间就没有太大问题。
Now here if the input is between minimum and maximum which is 2 to two to do it hasn't a great deal with it just between 2000 and 3000.
因此输出将与输入相同,因为爸爸在范围内。
So the output will be same as input because dad is in the range.
好的,如果低于范围 2000,则最多是在接缝将移动的范围之间,现在您可以想象,如果超出范围,则将移动 3000。
OK if this is below the range 2000 will be most it is between the range the seam will be moved and now you can imagine if this is out of the range then 3000 will be moved.
这是关在这里。
This is off here.
所以当你在这里看到这个位置时,这个 3 3 3 3 超出了 3000 的范围,所以 3000 已经移到了这里。
So when you see this spot here this 3 3 3 3 is out of the range of 3000 So 3000 has moved in here.
这很难做到,因为这还没有开始。
It's tough to do because this is not on.
因此,一旦您打开它,它将被移动到这里。
So once you turn it on this will be moved here.
我希望这是有道理的。
I hope this makes sense.
您有一个预定义的限制,因此您始终可以在该限制内显示输出。
You have a predefined limit so you can always display the output in that limit.
好的,如果超出了,您可以忽略它,并且可以移动最大移动量。
OK if it goes beyond you can ignore that and you can move the maximum movement.
好的。
OK.
这就是定居点建设。
So this was the settlement construction.